import request from './https.js'
//验证码
export const captchaImage=()=> {
    return request({
        url: '/captchaImage',
        method: 'GET'
    })
}
//登录
export const login=(data)=> {
    return request({
        url: '/pcRyAccount/pcLogin',
        method: 'POST',
        data,
    })
}
//图片上传  
export const uploadImg=(data)=>{
    return request({
        url: '/oss/uploadImg',
        method: 'POST',
        data,
    })   
}
//所有地块信息
export const findAllLands=(data)=> {
    return request({
        url: '/pcRyLand/findAllLands',
        method: 'GET',
        params:{...data}
    })
}
//地块租赁信息
export const findLeaseRecordByLandId=(data)=> {
    return request({
        url: '/pcRyTenancy/findLeaseRecordByLandId',
        method: 'GET',
        params:{...data}
    })
}
//所有品种
export const findAllVariety=(data)=> {
    return request({
        url: '/pcRyVariety/findAllVariety',
        method: 'GET', 
        params:{...data}
    })
}
//单个品种详情
export const findVarietyById=(data)=> {
    return request({
        url: '/pcRyVariety/findVarietyById',
        method: 'GET', 
        params:{...data}
    })
}
//新增编辑品种
export const addVariety=(data)=> {
    return request({
        url: '/pcRyVariety/addVariety',
        method: 'POST', 
        data
    })
}
//删除品种
export const removeVarietyById=(data)=> {
    return request({
        url: '/pcRyVariety/removeVarietyById/'+data,
        method: 'DELETE',
    })
}
//禁用编辑配置
export const compileLandMsg=(data)=> {
    return request({
        url: '/pcRyLand/compileLandMsg',
        method: 'PUT',
        data
    })
}
//单个地块详细信息
export const findLandMsgById=(data)=> {
    return request({
        url: '/pcRyLand/findLandMsgById',
        method: 'GET',
        params:{...data}
    })
}
//地块二维码
export const generateLandQrcode=(data)=> {
    return request({
        url: '/pcRyLand/generateLandQrcode',
        method: 'GET',
        params:{...data},
        responseType:'blob'
    })
}
//所有认养信息
export const findAllTenancyMessage=()=> {
    return request({
        url: '/pcRyTenancy/findAllTenancyMessage',
        method: 'GET',
    })
}
//单个认养详情
export const findTenancyByTenancyIdAndLandId=(data)=> {
    return request({
        url: '/pcRyTenancy/findTenancyByTenancyIdAndLandId',
        method: 'GET',
        params:{...data}
    })
}
//单个认养土地农事情况
export const findTaskMsgSByLandMsgId=(data)=> {
    return request({
        url: '/pcRyTask/findTaskMsgSByLandMsgId',
        method: 'GET',
        params:{...data}
    })
}
//获取收货人信息
export const findAddressById=(data)=> {
    return request({
        url: '/pcRyUserAddress/findAddressById',
        method: 'GET',
        params:{...data}
    })
}
//获取全部订单
export const getAllOrder=(data)=> {
    return request({
        url: '/pcRyTenancy/getAllOrder',
        method: 'GET',
        params:{...data}
    })
}
//订单详情
export const findTenancyDetailByTenancyId=(data)=> {
    return request({
        url: '/pcRyTenancy/findTenancyDetailByTenancyId',
        method: 'GET',
        params:{...data}
    })
}

//取消订单
export const cancelPayment=(data)=> {
    return request({
        url: '/pcRyTenancy/cancelPayment',
        method: 'PUT',
        params:{...data}
    })
}
//全部投入品
export const allVariableInputDetail=(data)=> {
    return request({
        url: '/pcRyVariableInput/allVariableInputDetail',
        method: 'GET',
        params:{...data}
    })
}
//投入品使用记录
export const variableInputUsageRecord=(data)=> {
    return request({
        url: '/pcRyVariableInput/variableInputUsageRecord',
        method: 'GET',
        params:{...data}
    })
}
//修改库存
export const inventoryAdjust=(data)=> {
    return request({
        url: '/pcRyVariableInput/inventoryAdjust',
        method: 'PUT',
        data
    })
}
//所有投入品类别
export const findVariableInputType=()=> {
    return request({
        url: '/pcRyVariableInput/findVariableInputType',
        method: 'GET'
    })
}

//编辑添加投入品
export const addVariableInput=(data)=> {
    return request({
        url: '/pcRyVariableInput/addVariableInput',
        method: 'POST',
        data
    })
}
//获取所有操作人
export const findAllOperator=()=> {
    return request({
        url: '/pcRyAccount/findAllOperator',
        method: 'GET',
    })
}
//查看所有合同
export const findSignContractDetail=(data)=> {
    return request({
        url: '/pcRyContract/findSignContractDetail',
        method: 'GET',
        params:{...data}
    })
}
//合同模板
export const findContract=()=> {
    return request({
        url: '/pcRyContract/findContract',
        method: 'GET'
    })
}
//下载模板
export const download=()=> {
    return request({
        url: '/pcRyContract/download',
        method:'POST',
        responseType:'blob'
    })
}
//查看个人模板
export const checkContract=(data)=> {
    return request({
        url: '/pcRyContract/checkContract',
        method:'GET',
        params:{...data}
    })
}
//编辑公告模板
export const addContract=(data)=> {
    return request({
        url: '/pcRyContract/addContract',
        method: 'POST',
        data
    })
}
//查询所有农事操作
export const findAllFarmOperator=(data)=> {
    return request({
        url: '/ryFarmOperator/findAllFarmOperator',
        method: 'GET',
        params:{...data}
    })
}
//查询农事操作详情
export const findFarmOperatorById=(data)=> {
    return request({
        url: '/ryFarmOperator/findFarmOperatorById',
        method: 'GET',
        params:{...data}
    })
}
//删除农事操作
export const delFarmOperatorById=(data)=> {
    return request({
        url: '/ryFarmOperator/delFarmOperatorById',
        method: 'DELETE',
        params:{...data}
    })
}
//编辑和新增农事操作
export const addFarmOperator=(data)=> {
    return request({
        url: '/ryFarmOperator/addFarmOperator',
        method: 'POST',
        data
    })
}
//查询所有人员
export const findPcAccountByCondition=(data)=> {
    return request({
        url: '/pcRyAccount/findPcAccountByCondition',
        method: 'GET',
        params:{...data}
    })
}
//查询单个人员信息
export const findPcUserByPcUserId=(data)=> {
    return request({
        url: '/pcRyAccount/findPcUserByPcUserId',
        method: 'GET',
        params:{...data}
    })
}
//查询所有部门
export const findUserdataByDepartmentId=(data)=> {
    return request({
        url: '/pcRyAccount/findUserdataByDepartmentId',
        method: 'GET',
        params:{...data}
    })
}
//新增人员
export const addPcAccount=(data)=> {
    return request({
        url: '/pcRyAccount/addPcAccount',
        method: 'POST',
        data
    })
}
//删除人员
export const removePcUserById=(data)=> {
    return request({
        url: '/pcRyAccount/removePcUserById',
        method: 'DELETE',
        params:{...data}
    })
}

//查询所有或者个人权限
export const findResourceByDepartmentIdAndUserId=(data)=> {
    return request({
        url: '/pcRyAccount/findResourceByDepartmentIdAndUserId',
        method: 'GET',
        params:{...data}
    })
}
//添加个人或者部门权限
export const giveDepartmentAndUserAddResource=(data)=> {
    return request({
        url: '/pcRyAccount/giveDepartmentAndUserAddResource',
        method: 'POST',
        data
    })
}
//添加部门
export const addDepartment=(data)=> {
    return request({
        url: '/pcRyAccount/addDepartment',
        method: 'POST',
        data
    })
}
//查询所有设备
export const findAllEquipmentDetails=(data)=> {
    return request({
        url: '/pcRyEquipment/findAllEquipmentDetails',
        method: 'GET',
        params:{...data}
    })
}
//根据id删除设备
export const delEquipmentById=(data)=> {
    return request({
        url: '/pcRyEquipment/delEquipmentById',
        method: 'DELETE',
        params:{...data}
    })
}
//添加/编辑设备
export const addEquipment=(data)=> {
    return request({
        url: '/pcRyEquipment/addEquipment',
        method: 'POST',
        data
    })
}
//添加地块
export const addLand=(data)=> {
    return request({
        url: '/pcRyLand/addLand',
        method: 'POST',
        data
    })
}
//添加基地
export const addBase=(data)=> {
    return request({
        url: '/pcRyBase/addBase',
        method: 'POST',
        data
    })
}
//所有基地和地块坐标
export const findAllCoords=()=> {
    return request({
        url: '/pcRyBase/findAllCoords',
        method: 'GET'
    })
}
//发货
export const deliverGoods=(data)=> {
    return request({
        url: '/pcRyTenancy/deliverGoods',
        method: 'POST',
        data
    })
}
//根据详细地块id查询产出物信息 ()
export const findGoodsByLandMsgId=(data)=> {
    return request({
        url: '/pcRyTenancy/findGoodsByLandMsgId',
        method: 'GET',
        params:{...data}
    })
}
//物流信息
export const queryTrack=(data)=> {
    return request({
        url: '/pcRyTenancy/queryTrack',
        method: 'GET',
        params:{...data}
    })
}



















